import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///全局常量
class Constants {
  Constants._();

  static final Constants _singleton = Constants._();

  ///单例
  factory Constants() => _singleton;

  /// 过期最大次数
  int get expiredMax => 5;

  ///未认证
  int get notAuthCode => 61;

  ///令牌过期
  int get tokenExpireCode => 100202;

  ///令牌无效
  int get tokenValidCode => 100203;

  ///网络状态:成功
  int get netSuccessful => 0;

  ///网络状态:无内容
  int get netStatusEmpty => 204;

  ///网络状态:404
  int get netStatus404 => 404;

  ///网络状态:错误
  int get netStatusFail => 500;

  //网络状态:超时
  int get netStatusTimeout => 504;

  ///设计尺寸
  Size get designSize => const Size(1024, 768);

  ///登录-尺寸-宽度
  double get loginSizeWith => 360.w;

  ///注册-尺寸-宽度
  double get registerSizeWidth => loginSizeWith;

  ///验证码图片-尺寸-宽度
  double get captchaSizeWidth => 110.w;

  ///验证码图片-尺寸-高度
  double get captchaSizeHeight => 36.h;
}

//常量单例
final constants = Constants();
